package com.literature.search.core.entity.esindex;

import cn.easyes.annotation.IndexField;
import cn.easyes.annotation.IndexId;
import cn.easyes.annotation.IndexName;
import cn.easyes.annotation.rely.FieldStrategy;
import cn.easyes.annotation.rely.FieldType;
import cn.easyes.annotation.rely.IdType;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * @Author: DangKong
 * @Date: 2023/4/2 22:44
 * @Description:
 */

@Data
@ApiModel("用户历史搜索关键词")
@IndexName("history_keywords")
public class HistoryKeywords {

    @IndexId(type = IdType.CUSTOMIZE)
    private String id;

    @IndexField(
            fieldType = FieldType.KEYWORD,
            strategy = FieldStrategy.NOT_NULL //字段策略 为null时不存储
    )
    private String userId;


    @IndexField(
            fieldType = FieldType.KEYWORD,
            strategy = FieldStrategy.NOT_NULL //字段策略 为null时不存储
    )
    private String keyword;
}
